package com.javayh.entity;

import javax.persistence.*;
import java.util.Objects;

/**
 * @author Dylan Yang
 * @Title: TreeDemoEntity
 * @ProjectName lucky
 * @Description: TODO
 * @date 2018/10/1317:24
 */
@Entity
@Table(name = "tree_demo", schema = "shiro_demo", catalog = "")
public class TreeDemoEntity {
    private Integer groupid;
    private String code;
    private String pcode;
    private String noteType;
    private String groupKey;
    private String seqne;
    private String groupName;

    @Id
    @Column(name = "groupid")
    public Integer getGroupid() {
        return groupid;
    }

    public void setGroupid(Integer groupid) {
        this.groupid = groupid;
    }

    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "pcode")
    public String getPcode() {
        return pcode;
    }

    public void setPcode(String pcode) {
        this.pcode = pcode;
    }

    @Basic
    @Column(name = "note_type")
    public String getNoteType() {
        return noteType;
    }

    public void setNoteType(String noteType) {
        this.noteType = noteType;
    }

    @Basic
    @Column(name = "group_key")
    public String getGroupKey() {
        return groupKey;
    }

    public void setGroupKey(String groupKey) {
        this.groupKey = groupKey;
    }

    @Basic
    @Column(name = "seqne")
    public String getSeqne() {
        return seqne;
    }

    public void setSeqne(String seqne) {
        this.seqne = seqne;
    }

    @Basic
    @Column(name = "group_name")
    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TreeDemoEntity that = (TreeDemoEntity) o;
        return Objects.equals(groupid, that.groupid) &&
                Objects.equals(code, that.code) &&
                Objects.equals(pcode, that.pcode) &&
                Objects.equals(noteType, that.noteType) &&
                Objects.equals(groupKey, that.groupKey) &&
                Objects.equals(seqne, that.seqne) &&
                Objects.equals(groupName, that.groupName);
    }

    @Override
    public int hashCode() {

        return Objects.hash(groupid, code, pcode, noteType, groupKey, seqne, groupName);
    }
}

